################################################################################
# File Name   : source_linux.mk
# Description : Source definitions for GDateTime module of gUtil. Modules that
#               rely on GDateTime will have their makefile include this file.
#
# Created on  : 2010-01-17
# Updated on  : 2010-05-26
# Updated by  : Lee Shiou Ming
#
# Cautions    : (important notes)
################################################################################

####### Environment checking (if any) ##########################################

ifndef GUTIL_PATH
    $(error GUTIL_PATH must be defined)
endif # !GUTIL_PATH

ifndef BOOST_ROOT_PATH
    $(error BOOST_ROOT_PATH must be defined)
endif # !BOOST_ROOT_PATH

####### Compiler, tools and options ############################################

ifeq (,$(findstring -I"$(GUTIL_PATH)",$(INC_PATHS)))
    INC_PATHS += -I"$(GUTIL_PATH)"
endif
ifeq (,$(findstring -I"$(BOOST_ROOT_PATH)",$(INC_PATHS)))
    INC_PATHS += -I"$(BOOST_ROOT_PATH)"
endif

####### Output directory #######################################################

GDATETIME_PATH = $(GUTIL_PATH)/GDateTime

####### Files ##################################################################

SOURCES += $(GDATETIME_PATH)/GDateTime.cpp

OBJECTS += $(GDATETIME_PATH)/GDateTime.o

####### Build rules ############################################################

%.o: %.cpp
	@echo Compiling... $(<F)
	$(CXX) -c $(CXXFLAGS) $(INC_PATHS) -o "$@" "$<"
